# Installation of the Smart School ## 2.1 Teaching Building ### 1. Installation of the Teaching Building #### Step 1: Install ESP32 board 1.1 Required parts ![ZH_01](./img/ZH_01.png) 1.2 ![ZH_02](./img/ZH_02.png) 1.3 ![ZH_03](./img/ZH_03.png) 1.4 **Note: The servo angle needs to be calibrated. Follow the instructions shown below**. Required parts ![D1](./img/D1.png) Required wire: ![2p200](./img/2p200.png) - 2PIN M-F DuPont wire (random color) | servo | servo control module | | :---------: | :------------------: | | orange wire | S | | red wire | V | | brown wire | G | | servo control module | main control board | | :------------------: | :----------------: | | 5V | 5V | | G | GND | Wiring diagram: ![D2](./img/D2.png) ![D3](./img/D3.png) **After servo calibration, please remove all the wiring**. #### Step 2: Assemble desks and chairs 2.1 Required parts ![ZH_04](./img/ZH_04.png) 2.2 ![ZH_05](./img/ZH_05.png) ![ZH_06](./img/ZH_06.png) ![ZH_07](./img/ZH_07.png) ![ZH_08](./img/ZH_08.png) ![ZH_09](./img/ZH_09.png) ![ZH_10](./img/ZH_10.png) 2.3 ![ZH_11](./img/ZH_11.png) ![ZH_12](./img/ZH_12.png) ![ZH_13](./img/ZH_13.png) #### Step 3: Install modules on the back wall 3.1 Required parts ![ZH_14](./img/ZH_14.png) 3.2 ![ZH_15](./img/ZH_15.png) ![ZH_16](./img/ZH_16.png) 3.3 ![ZH_17](./img/ZH_17.png) ![ZH_18](./img/ZH_18.png) #### Step 4: Install the classroom blackboard 4.1 Required parts ![ZH_19](./img/ZH_19.png) 4.2 ![ZH_20](./img/ZH_20.png) ![ZH_21](./img/ZH_21.png) 4.3 ![ZH_22](./img/ZH_22.png) ![ZH_23](./img/ZH_23.png) #### Step 5: Install modules on the front wall 5.1 Required parts ![ZH_24](./img/ZH_24.png) 5.2 ![ZH_25](./img/ZH_25.png) ![ZH_26](./img/ZH_26.png) 5.3 ![ZH_27](./img/ZH_27.png) ![ZH_27](./img/ZH_28.png) #### Step 6: Assemble walls 6.1 Required parts ![ZH_28](./img/ZH_29.png) 6.2 ![ZH_29](./img/ZH_30.png) ![ZH_30](./img/ZH_31.png) #### Step 7: Assemble two side walls, install the button module 7.1 Required parts ![ZH_31](./img/ZH_32.png) 7.2 ![ZH_32](./img/ZH_33.png) ![ZH_33](./img/ZH_34.png) 7.3 ![ZH_33](./img/ZH_35.png) ![ZH_33](./img/ZH_36.png) ### 2. Wiring of Teaching Building #### Step 8: Teaching building wiring 8.1 Please connect the wires in the following order. When connecting, please distinguish the color of the wires. | # | Module | Wire | ESP32 board pin | | :--: | :----------------------------------------: | :-------------------------------: | :----------------: | | 1 | camera | 4PIN (black-red-yellow-white) | | | 2 | button module | 3PIN 250mm | IO26 | | 3 | PIR motion sensor | 3PIN 250mm | IO25 | | 4 | stepper motor drive board | 6PIN 200mm | | | 5 | white LED module | 3PIN 200mm | IO12 | | 6 | motor drive board | 4PIN 350mm (black-red-blue-green) | IO5(INA) IO13(INB) | | 7 | passive buzzer | 3PIN 200mm | IO19 | | 8 | obstacle avoidance sensor | 3PIN 200mm | IO18 | | 9 | OLED module | 4PIN 200mm (black-red-blue-green) | | | 10 | ENS160 air quality sensor | 4PIN 200mm (black-red-blue-green) | BUS 12C | | 11 | AHT20 temperature
and humidity sensor | 4PIN 200mm (black-red-blue-green) | BUS 12C | | 12 | RFID module | 4PIN 400mm (black-red-blue-green) | BUS 12C | | 13 | photoresistor | 3PIN 200mm | IO34 | | 14 | RGB LED module | 3PIN 200mm | IO4 | 8.2 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :----: | :---------------------------: | :---------------: | | camera | 4PIN (black-red-yellow-white) | UART | The wire needed here: ![XH2.54-4P 200mm 01](./img/XH2.54-4P 200mm 01.png) When wiring, connect the 4pin header to the camera, and pass 4 female headers through hole 1 and then connect them to the ESP32 main board. ![J1-1](./img/J1-1.jpg) When connecting to the main board, please distinguish the colors of wires. | camera | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | TX | Yellow wire | RX | | RX | White wire | TX | ![J1](./img/J1.png) 8.3 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :-----------: | :--------: | :---------------: | | button module | 3PIN 250mm | IO26 | The wire needed here: ![3p 250mm 01](./img/3p 250mm 01.png) When wiring, connect one end of the wire to the single-channel button module, and pass the other end successively through Hole 2 and Hole 1, and then connect it to the ESP32 main board. ![j2-1](./img/j2-1.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO26 | ![J2](./img/J2.png) 8.4 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :---------------: | :--------: | :---------------: | | PIR motion sensor | 3PIN 250mm | IO25 | The wire needed here: ![3p 250mm 02](./img/3p 250mm 02.png) When wiring, connect one end of the wire to the PIR motion sensor, and pass the other end successively through Hole 3 and Hole 1, and then connect it to the ESP32 main board. ![j3](./img/j3.JPG) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO25 | ![J3](./img/J3.png) 8.5 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :-----------------------: | :--------: | :---------------: | | stepper motor drive board | 6PIN 200mm | | The wire needed here: ![6Pin ](./img/6Pin .png) ⚠️ **Please note that there is no need to pay attention to the color of the 6-pin wire. Make sure that the module wiring corresponds to that of main board.** When wiring, connect one end of the wire to the stepper motor drive board, and pass the other end through Hole 4, and then connect it to the ESP32 main board. ![j4](./img/j4.jpg) Please connect to the main control board in the order of the wiring on the stepper motor drive board as shown below: ![J4](./img/J4.png) 8.6 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :--------------: | :--------: | :---------------: | | white LED module | 3PIN 200mm | IO12 | The wire needed here: ![3p 200mm 01](./img/3p 200mm 01.png) When wiring, connect one end of the wire to the white LED module, and pass the other end through Hole 5, and then connect it to the ESP32 main board. ![j5](./img/j5.jpg) When connecting to the main board, please distinguish the colors of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO12 | ![J5](./img/J5.png) 8.7 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :---------------: | :-------------------------------: | :---------------: | | motor drive board | 4PIN 350mm (black-red-blue-green) | IO5、IO13 | The wire needed here: ![4Pin 350mm 01](./img/4Pin 350mm 01.png) When wiring, connect the 4pin end of the wire to the motor drive board, and pass 4 female headers successively through Hole 3 and Hole 1, and then connect them to the ESP32 main board. ![j6](./img/j6.jpg) ![j6-1](./img/j6-1.jpg) When connecting to the main board, please distinguish the colors of the wires. | Module | Wire color | ESP32 board pin | | :----: | :--------: | :-------------: | | GND | Black wire | G | | VCC | Red wire | V | | B-IB | Green wire | IO13 | | B-IA | Blue wire | IO5 | ![J6](./img/J6.png) 8.8 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :------------: | :--------: | :---------------: | | passive buzzer | 3PIN 200mm | IO19 | The wire needed here: ![3p 200mm 02](./img/3p 200mm 02.png) When wiring, connect one end of the wire to the passive buzzer, and pass the other end through Hole 6, and then connect it to the ESP32 main board. ![j7](./img/j7.JPG) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO19 | ![J7](./img/J7.png) 8.9 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :-----------------------: | :--------: | :---------------: | | obstacle avoidance sensor | 3PIN 200mm | IO18 | The wire needed here: ![3p 200mm 03](./img/3p 200mm 03.png) When wiring, connect one end of the wire to the obstacle avoidance sensor, and pass the other end through Hole 6, and then connect it to the ESP32 main board. ![j8](./img/j8.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO18 | ![J8](./img/J8.png) 8.10 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :----------: | :-------------------------------: | :---------------: | | OLED display | 4PIN 200mm (black-red-blue-green) | BUS 12C | The wire needed here: ![4Pin 150mm](./img/4Pin 150mm.png) When wiring, connect 4pin end of the wire to the OLED display, and connect 4 female headers to the ESP32 main board. ![j9](./img/j9.jpg) ![j9-1](./img/j9-1.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :--------: | :-------------: | | GND | Red wire | GND | | VCC | Black wire | VCC | | SCL | Blue wire | SCL | | SDA | Green wire | SDA | **Note that the sequence of SCL and SDA on the main board is reversed to that of the OLED module.** ![J9](./img/J9.png) 8.11 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :-----------------------: | :-------------------------------: | :---------------: | | ENS160 air quality sensor | 4PIN 200mm (black-red-blue-green) | BUS 12C | The wire needed here: ![4Pin 200mm Double splicing 01](./img/4Pin 200mm Double splicing 01.png) When wiring, connect one end of the wire to the ENS160 air quality sensor, and pass the other end through Hole 7, and then connect it to the ESP32 main board. ![j10](./img/j10.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :--------: | :-------------: | | GND | Black wire | GND | | VCC | Red wire | V | | SDA | Blue wire | SDA | | SCL | Green wire | SCL | ![J10](./img/J10.png) 8.12 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :-----------------------------------: | :-------------------------------: | :---------------: | | AHT20 temperature and humidity sensor | 4PIN 200mm (black-red-blue-green) | BUS 12C | The wire needed here: ![4Pin 200mm Double splicing 02](./img/4Pin 200mm Double splicing 02.png) When wiring, connect one end of the wire to the AHT20 temperature and humidity sensor, and pass the other end through Hole 7, and then connect it to the ESP32 main board. ![j11](./img/j11.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :--------: | :-------------: | | GND | Black wire | GND | | VCC | Red wire | V | | SDA | Blue wire | SDA | | SCL | Green wire | SCL | ![J11](./img/J11.png) 8.13 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :---------: | :-------------------------------: | :---------------: | | RFID module | 4PIN 400mm (black-red-blue-green) | BUS 12C | The wire needed here: ![ ](./img/4Pin 400mm Double splicing 02.png) When wiring, connect one end of the wire to the RFID module, and pass the other end successively through Hole 3 and Hole 1, and then connect it to the ESP32 main board. ![j12](./img/j12.jpg) ![j12-1](./img/j12-1.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :--------: | :-------------: | | GND | Black wire | GND | | VCC | Red wire | V | | SDA | Blue wire | SDA | | SCL | Green wire | SCL | ![J12](./img/J12.png) 8.14 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :-----------: | :--------: | :---------------: | | photoresistor | 3PIN 200mm | IO34 | The wire needed here: ![3p 200mm 04](./img/3p 200mm 04.png) When wiring, connect one end of the wire to the photoresistor, and pass the other end through Hole 8, and then connect it to the ESP32 main board. ![j13](./img/j13.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO34 | ![J13](./img/J13.png) 8.15 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :--------: | :--------: | :---------------: | | RGB module | 3PIN 200mm | IO4 | The wire needed here: ![3p 200mm 05](./img/3p 200mm 05.png) When wiring, connect one end of the wire to the RGB module, and pass the other end through Hole 8, and then connect it to the ESP32 main board. ![j15](./img/j15.jpg) When wiring, please distinguish the color of the wire. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Black wire | G | | S | Yellow wire | IO4 | ![J15](./img/J15.png) ⚠**Note: After wire up the above sensors and modules, it is as shown below.** ![j16](./img/j16.jpg) ## 2.2 Playground ### 1. Construction of Playground Facilities #### Step 9: Build the battery holder slot 9.1 Required parts ![](./img/ZH_37.png) 9.2 ![](./img/ZH_38.png) ![ZH_39](./img/ZH_39.png) #### Step 10: Mount the teaching building and its base 10.1 ![ZH_40](./img/ZH_40.png) 10.2 ![ZH_41](./img/ZH_41.png) ![ZH_42](./img/ZH_42.png) 10.3 ![ZH_43](./img/ZH_43.png) ![ZH_44](./img/ZH_44.png) #### Step 11:Install the basket and obstacle avoidance sensor 11.1 Required parts ![ZH_45](./img/ZH_45.png) 11.2 ![ZH_46](./img/ZH_46.png) ![ZH_47](./img/ZH_47.png) 11.3 ![ZH_48](./img/ZH_48.png) ![ZH_49](./img/ZH_49.png) #### Step 12: Assemble street lamp 12.1 Required parts ![ZH_50](./img/ZH_50.png) 12.2 ![ZH_51](./img/ZH_51.png) ![ZH_52](./img/ZH_52.png) #### Step 13: Assemble flag lifting platform 13.1 Required parts ![ZH_53](./img/ZH_53.png) 13.2 Pay attention to the color of the wires. Wires should be placed on the right side, with the red wire at the bottom. Note to pass wires through the rectangular hole. ![ZH_54](./img/ZH_54.png) ![ZH_55](./img/ZH_55.png) 13.3 ![ZH_56](./img/ZH_56.png) ![ZH_57](./img/ZH_57.png) #### Step 14: Mount playground facilities 14.1 Required parts ![ZH_58](./img/ZH_58.png) 14.2 ![ZH_59](./img/ZH_59.png) ![ZH_60](./img/ZH_60.png) #### Step 15: Build the access control system 15.1 Required parts ![ZH_61](./img/ZH_61.png) 15.2 ![ZH_62](./img/ZH_62.png) ![ZH_63](./img/ZH_63.png) 15.3 ![ZH_64](./img/ZH_64.png) ![ZH_65](./img/ZH_65.png) 15.4 ![ZH_66](./img/ZH_66.png) ![ZH_67](./img/ZH_67.png) ![ZH_68](./img/ZH_68.png) 15.5 ![ZH_69](./img/ZH_69.png) ![ZH_70](./img/ZH_70.png) 15.6 ![ZH_71](./img/ZH_71.png) ![ZH_72](./img/ZH_72.png) 15.7 ![ZH_73](./img/ZH_73.png) ![ZH_74](./img/ZH_74.png) #### Step 16: Assemble the access control system 16.1 Required parts ![ZH_75](./img/ZH_75.png) 16.2 ![ZH_76](./img/ZH_76.png) ⚠️ **Note: Before installing the servo onto the base board, servo wires need to be inserted through the rectangular hole on the base board.** ![ZH_77](./img/ZH_77.png) 16.3 ![ZH_78](./img/ZH_78.png) ![ZH_78-1](./img/ZH_79.jpg) ![ZH_79](./img/ZH_79.png) 16.4 ![ZH_80](./img/ZH_80.png) ![ZH_81](./img/ZH_81.png) 16.5 ![ZH_82](./img/ZH_82.png) ![ZH_83](./img/ZH_83.png) #### Step 17: Install the flagpole of the platform 17.1 Required parts ![ZH_84](./img/ZH_84.png) ⚠**ATTENTION:** Acrylic flagpole is packaged separately. It is recommended to remove its protective films. ![X2](img/X2.JPG) 17.2 ![ZH_85](./img/ZH_85.png) ![ZH_86](./img/ZH_86.png) ![ZH_87](./img/ZH_87.png) 17.3 ![ZH_88](./img/ZH_88.png) ![ZH_89](./img/ZH_89.png) 17.4 ![ZH_90](./img/ZH_90.png) ![ZH_91](./img/ZH_91.png) ![ZH_92](./img/ZH_92.png) 17.5 ![ZH_93](./img/ZH_93.png) ![](img/ZH_94.png) ### 2. Wiring of Playground Facilities #### Step 18: Wire up the motor drive board and servo 18.1 Please connect the wires in the following order. When connecting, please distinguish the color of the wires. | # | Module | Wire | Corresponding pin | | :--: | :----: | :--: | :------------------------------: | | 1 | servo | / | ESP32 board: IO32 | | 2 | motor | / | motor drive board: blue terminal | 18.2 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :----: | :--: | :---------------: | | servo | / | IO32 | Wind servo wires from the bottom to the back of the building and pass it through Hole 4. ![j19](./img/j19.jpg) When connecting to the main board, please distinguish the color of the wires. | Module | Wire color | ESP32 board pin | | :----: | :---------: | :-------------: | | V | Red wire | V | | G | Brown wire | G | | S | Yellow wire | IO32 | ![J14](./img/J14.png) 18.3 Connect the module to the ESP32 main control board via the wire as shown in the diagram. | Module | Wire | Corresponding pin | | :----: | :--: | :------------------------------: | | motor | / | motor drive board: blue terminal | ![j20](./img/j20.JPG) ![J6 - 1](./img/J6 - 1.png) ## 2.3 Fences and Classroom Equipment ### 1. Fences #### Step 19: Build the school fence 19.1 Required parts ![ZH_95](./img/ZH_95.png) 19.2 ![ZH_96](./img/ZH_96.png) ![OP](./img/ZH_97.png) 19.3 ![ZH_98](./img/ZH_98.png) ![ZH_99](./img/ZH_99.png) ![ZH_100](./img/ZH_100.png) ![ZH_101](./img/ZH_101.png) ### 2. Classroom Equipment #### Step 20: Install stepper motor drive system 20.1 Required parts ![ZH_102](./img/ZH_102.png) 20.2 ![ZH_103](./img/ZH_103.png) ![ZH_104](./img/ZH_104.png) 20.3 ![ZH_105](./img/ZH_105.png) ![ZH_106](./img/ZH_106.png) 20.4 ![ZH_107](./img/ZH_107.png) ![ZH_108](./img/ZH_108.png) 20.5 ![ZH_109](./img/ZH_109.png) ![ZH_110](./img/ZH_110.png) 20.6 ![ZH_111](./img/ZH_111.png) ![ZH_112](./img/ZH_112.png) #### Step 21: Put on the curtain 21.1 Required parts ![ZH_113](./img/ZH_113.png) 21.2 ![ZH_114](./img/ZH_114.png) ![ZH_114-1](./img/ZH_115.jpg) ![ZH_115](./img/ZH_115.png) ![ZH_115-1](./img/ZH_116.jpg) 21.3 ![ZH_116](./img/ZH_116.png) ![ZH_117](./img/ZH_117.png) 21.3 Stick the curtain on the wall of the teaching building. #### Step 22: Install RGB module 22.1 Required parts ![ZH_118](./img/ZH_118.png) ⚠**ATTENTION:** Acrylic ceiling is packaged separately. It is recommended to remove its protective films. ![ZH_118-1](./img/X1.jpg) 22.2 ![ZH_119](./img/ZH_119.png) ![ZH_120](./img/ZH_120.png) #### Step 23: Assemble the ceiling 23.1 Required parts ![ZH_121](./img/ZH_121.png) 23.2 ⚠ **ATTENTION** : First, install the ceiling into the two small round holes on the front wall of the teaching building, and then press the ceiling down vertically against the back wall. ![ZH_122](./img/ZH_122.png) ![ZH_123](./img/ZH_123.png) ![ZH_124](./img/ZH_124.png) ## 2.4 Ball Collection Box and Battery Holder ### 1. Ball Collection Box #### Step 24: Make a movable ball collection box 24.1 Required parts ![ZH_125](./img/ZH_125.png) 24.2 ![ZH_126](./img/ZH_126.png) ![ZH_127](./img/ZH_127.png) ![ZH_128](./img/ZH_128.png) ![ZH_129](./img/ZH_129.png) 24.3 ![ZH_130](./img/ZH_130.png) ![](img/ZH_131.png) ### 2. Battery Holder #### Step 25: Add a wire hook and the battery holder 25.1 Required parts ![ZH_132](./img/ZH_132.png) 25.2 ![ZH_133](./img/ZH_133.png) 25.3 Connect the wires of the stepper motor to the stepper motor driver board, and arrange the wires of the servo and the stepper motor onto the hook ![](img/J4-1.png) ![](img/ZH_130-1.jpg) 25.3 ![](img/ZH_134.png) ![](img/ZH_135.png) ![](img/ZH_136.png) ![](img/ZH_137.png) #### Completed ! ![ZH_134](./img/ZH_138.png)